package com.ark.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName("category")
@Schema(description = "菜品分类实体类")
public class Category implements Serializable {
    @Schema(description = "分类id")
    @TableId(type = IdType.AUTO)
    private Long id;

    //类型: 1菜品分类 2套餐分类
    @Schema(description = "类型: 1-菜品分类 2-套餐分类")
    private Integer type;

    //分类名称
    @Schema(description = "分类名称")
    private String name;

    //顺序
    @Schema(description = "排序")
    private Integer sort;

    //分类状态 0标识禁用 1表示启用
    @Schema(description = "分类标识 0-禁用 1-启用")
    private Integer status;

    //创建时间
    @Schema(description = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    private LocalDateTime createTime;

    //更新时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    @Schema(description = "更新时间")
    private LocalDateTime updateTime;

    //创建人
    @Schema(description = "创建人")
    private Long createUser;

    //修改人
    @Schema(description = "修改人")
    private Long updateUser;
}
